package com.example.constants;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;

//为了防止微信支付的请求地址前缀发生变化，因此请求前缀存储在mysql,redis中，请求时进行拼接即可。
@AllArgsConstructor
@Getter
@ApiModel("请求地址")
public enum WxApiConstants {

    @ApiModelProperty("Native下单")
    NATIVE_PAY("/v3/pay/transactions/native"),

    @ApiModelProperty("jsapi下单")
    JSAPI_PAY("/v3/pay/transactions/jsapi"),

    @ApiModelProperty("jsapi下单")
    H5_PAY("/v3/pay/transactions/h5"),

    @ApiModelProperty("APP下单")
    APP_PAY("/v3/pay/transactions/app"),

    @ApiModelProperty("查询订单")
    ORDER_QUERY_BY_NO("/v3/pay/transactions/out-trade-no/%s"),

    @ApiModelProperty("关闭订单")
    CLOSE_ORDER_BY_NO("/v3/pay/transactions/out-trade-no/%s/close"),

    @ApiModelProperty("申请退款")
    DOMESTIC_REFUNDS("/v3/refund/domestic/refunds"),

    @ApiModelProperty("查询单笔退款")
    DOMESTIC_REFUNDS_QUERY("/v3/refund/domestic/refunds/%s"),

    @ApiModelProperty("申请交易账单")
    TRADE_BILLS("/v3/bill/tradebill"),

    @ApiModelProperty("申请资金账单")
    FUND_FLOW_BILLS("/v3/bill/fundflowbill");

    @ApiModelProperty("类型")
    private final String type;

}
